package com.s69.controller;

import com.s69.entity.Hospital;
import com.s69.entity.MedicalAssay;
import com.s69.service.HospitalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/hospital")
public class HospitalController {

    @Autowired
    HospitalService hospitalService;
    @GetMapping
    @ResponseBody
    public List<Hospital> queryAll(){
        return hospitalService.queryAll();
    }

}
